@extends('manager._layouts.default')
 
@section('main')
 
    <h2>
        Products <a href="{{ URL::route('manager.products.create') }}" class="btn btn-primary btn-xxs" data-toggle="tooltip" title="Add new product"><i class="fa fa-fw fa-plus"></i></a>
    </h2>
	
	{{ Notification::showAll() }}
     
    <div class="row">
        <div class="col-lg-12" id="blocklist-container">
            <ul class='blocklist full' id=''>
            @foreach($products as $product)
                <li data-productid='{{$product->id}}'>
                    <div class='blocklistitem'>
                        {{ $product->name }}

                        
                        <?=\Form::open(array(
                            "route" => array("manager.products.destroy", $product->id), 
                            "method" => "delete",
                            "class" => "pull-right delete-product"
                        ));?>
                            <button class='btn btn-danger btn-xxs' type='submit' data-toggle='tooltip' title='Delete'><i class='fa fa-fw fa-trash-o'></i></button>

                        <?=\Form::close();?>
                        
                        <a href="<?=\URL::route("manager.products.edit", $product->id)?>" class='btn btn-xxs btn-warning pull-right' data-toggle='tooltip' title='Edit'><i class='fa fa-fw fa-edit'></i></a>
                        
                    </div>
                </li>
            @endforeach
            </ul>
        </div>
    </div>
@stop